package com.ship.dispatch.service;

import com.ship.common.core.web.domain.JsonResult;
import com.ship.common.business.service.BaseService;
import com.ship.dispatch.bean.SmShipCrew;
import com.ship.dispatch.bean.SmShipCrewDetail;
import com.ship.dispatch.bo.SmShipCrewImportBo;

/**
* @author zhangyh
* @description 针对表【sm_ship_crew(船舶船员信息主表)】的数据库操作Service
* @createDate 2024-01-16 16:11:00
*/
public interface SmShipCrewService extends BaseService<SmShipCrew> {

    /**
     * 船员批量导入
     * @param bo
     * @return
     */
    JsonResult baseImport(SmShipCrewImportBo bo);

    /**
     * 更新船员数量信息
     * @param smShipCrew
     */
    void resetCrewCountInfo(SmShipCrew smShipCrew);

    /**
     *
     * @param smShipCrew
     * @return
     */
    void baseUpdate(SmShipCrew smShipCrew);

    /**
     * 详情
     * @param shipCrewId
     * @return
     */
    SmShipCrew baseDetail(Long shipCrewId);

    /**
     * 获取当前用户当前船只下的船员缓存信息
     * @param shipCrewId
     * @return
     */
    SmShipCrewDetail detailTempCrew(Long shipCrewId);

    /**
     * 船员编辑
     * @param smShipCrewDetail
     */
    JsonResult detailUpdate(SmShipCrewDetail smShipCrewDetail);

    /**
     * 删除基础船舶信息
     * @param shipCrewId
     */
    void baseDelete(Long shipCrewId);

    void cancelDelete(String businessKey, Integer status);

    /**
     * 船员自动离船
     */
    void checkShipCrewStatus();
}
